import 'virtual:windi-base.css'
import 'virtual:windi-components.css'


import 'virtual:windi-utilities.css'
import 'virtual:windi-devtools'

// 你自定义的 css
import './styles/main.css'
import ElementPlus from 'element-plus'              //加载组件
import 'element-plus/dist/index.css'               //加载样式
import * as Icons from '@element-plus/icons-vue'  //加载图标
import {toLine} from './api/moFunction';          // 加载更名函数



import App from './App.vue'
import { useModules }  from 'virtual:modules'

const app = createApp(App)



// 插件自动加载
app.use(ElementPlus)
useModules(app)



app.mount('#app')


//* 全局注册图标控件,会牺牲性能 <el-icon-edit />
for( let i in Icons){
    app.component(`mo-icon-${toLine(i)}`,(Icons as any)[i]); //! el- 开头会与自动加载属性冲突，只能改成 mo- 开头了
}
